1. To verify the legitimacy of a transaction, or avoiding the so-

called double-spending.

2. To create new digital currencies by rewarding the miners for

performing the previous task.

1.6.2 Proof of Work

We already explored how easy it is to add a block to an existing

Blockchain. In one minute, thousands, if not millions, of blocks could

be added to the Blockchain network with such a process. In order to

minimize this, so that there is no spam and a block is properly

validated with adequate time, a mining mechanism called “proof of

work” is added to the system.

Individual blocks must contain a proof of work to be considered valid.

This proof of work is verified by the other Bitcoin nodes, each time

receiving a block. Bitcoin uses the hashcash proof-of-work function,

which is described as follows:

Transactions are bundled together into what we call a block.

The miners verify that the transactions within each block are

legitimate.

To do so, the miners should solve a mathematical puzzle known

as the proof-of-work problem.

A reward is given to the first miner who solves each block’s

problem.

The verified transactions are stored in the public Blockchain.

When a miner finally finds the right solution, he/she announces

it to the whole network, at the same time, receiving a crypto-

currency prize (the reward) provided by the protocol.

As the difficulty level increases over time, the miners use more

powerful machines to calculate the correct hash as soon as possible

to come out as the winner. Currently, the time taken in the Bitcoin

Blockchain to add a block is around 10 minutes.

1.6.3 Consensus with Proof of Work